#include "stdint.h"
#include "api.h"

#if defined(__CC_ARM) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
void mallocAttachInit(void) {
	extern char Image$$RW_IRAM4$$ZI$$Limit[];
	//extern char Image$$ER_IROM1$$Base[];
	//SamOS_mallocInit((uint32_t)Image$$RW_IRAM4$$ZI$$Limit, (uint32_t)Image$$ER_IROM1$$Base - 1024);
	SamOS_mallocInit((uint32_t)Image$$RW_IRAM4$$ZI$$Limit, 0x28020000 - 1024);
}
#endif
